package Stream_test;

public class user {
    private int id;
    private String name;
    user(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public String toString()
    {

        return name + " id = " + id;
    }

    @Override
    public boolean equals(Object obj) {
        return id == ((user) obj).id;
    }

    @Override
    public int hashCode() {
        return id;
    }
}
